home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / benchmarks / itc / gcc / tm-sequent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-30  |  3.3 KB  |  102 lines

  1. /* Definitions of target machine for GNU compiler.  SEQUENT NS32000 version.
  2.    Copyright (C) 1987 Free Software Foundation, Inc.
  3.    Contributed by Michael Tiemann (tiemann@mcc.com)
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY.  No author or distributor
  9. accepts responsibility to anyone for the consequences of using it
  10. or for whether it serves any particular purpose or works at all,
  11. unless he says so in writing.  Refer to the GNU CC General Public
  12. License for full details.
  13.  
  14. Everyone is granted permission to copy, modify and redistribute
  15. GNU CC, but only under the conditions described in the
  16. GNU CC General Public License.   A copy of this license is
  17. supposed to have been given to you along with GNU CC so you
  18. can know your rights and responsibilities.  It should be in a
  19. file named COPYING.  Among other things, the copyright notice
  20. and this notice must be preserved on all copies.  */
  21.  
  22. /* Two flags to control how addresses are printed in assembler insns.  */
  23. #define SEQUENT_ADDRESS_BUG 1
  24. #define SEQUENT_BASE_REGS
  25.  
  26. #include "tm-ns32k.h"
  27.  
  28. /* This is BSD, so it wants DBX format.  */
  29. #define DBX_DEBUGGING_INFO
  30.  
  31. /* Sequent has some changes in the format of DBX symbols.  */
  32. #define DBX_NO_XREFS 1
  33.  
  34. /* Don't split DBX symbols into continuations.  */
  35. #define DBX_CONTIN_LENGTH 0
  36.  
  37. #define TARGET_DEFAULT 1
  38.  
  39. #undef TARGET_VERSION
  40. #undef CPP_PREDEFINES
  41. #undef PRINT_OPERAND
  42. #undef PRINT_OPERAND_ADDRESS
  43.  
  44. /* Print subsidiary information on the compiler version in use.  */
  45. #define TARGET_VERSION printf (" (32000, Sequent syntax)");
  46.  
  47. #define CPP_PREDEFINES "-Dns32000 -Dsequent -Dunix"
  48.  
  49. /* %$ means print the prefix for an immediate operand.
  50.    On the sequent, no prefix is used for such.  */
  51.  
  52. #define PRINT_OPERAND(FILE, X, CODE)  \
  53. { if (CODE == '$') ;                            \
  54.   else if (CODE == '?');                        \
  55.   else if (GET_CODE (X) == REG)                        \
  56.     fprintf (FILE, "%s", reg_name [REGNO (X)]);                \
  57.   else if (GET_CODE (X) == MEM)                        \
  58.     {                                    \
  59.       rtx xfoo;                                \
  60.       xfoo = XEXP (X, 0);                        \
  61.       switch (GET_CODE (xfoo))                        \
  62.     {                                \
  63.     case MEM:                            \
  64.       if (GET_CODE (XEXP (xfoo, 0)) == REG)                \
  65.         if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM)        \
  66.           fprintf (FILE, "0(0(sp))");                \
  67.         else fprintf (FILE, "0(0(%s))",                \
  68.               reg_name [REGNO (XEXP (xfoo, 0))]);        \
  69.       else                                \
  70.         {                                \
  71.           fprintf (FILE, "0(");                    \
  72.           output_address (xfoo);                    \
  73.           putc (')', FILE);                        \
  74.         }                                \
  75.       break;                            \
  76.     case REG:                            \
  77.       fprintf (FILE, "0(%s)", reg_name [REGNO (xfoo)]);        \
  78.       break;                            \
  79.     case PRE_DEC:                            \
  80.     case POST_INC:                            \
  81.       fprintf (FILE, "tos");                    \
  82.       break;                            \
  83.     case CONST_INT:                            \
  84.       fprintf (FILE, "@%d", INTVAL (xfoo));                \
  85.       break;                            \
  86.     default:                            \
  87.       output_address (xfoo);                    \
  88.       break;                            \
  89.     }                                \
  90.     }                                    \
  91.   else if (GET_CODE (X) == CONST_DOUBLE)                \
  92.     if (GET_MODE (X) == DFmode)                        \
  93.       { union { double d; int i[2]; } u;                \
  94.     u.i[0] = XINT (X, 0); u.i[1] = XINT (X, 1);            \
  95.     fprintf (FILE, "0d%.20e", u.d); }                \
  96.     else { union { double d; int i[2]; } u;                \
  97.        u.i[0] = XINT (X, 0); u.i[1] = XINT (X, 1);            \
  98.        fprintf (FILE, "0f%.20e", u.d); }                \
  99.   else output_addr_const (FILE, X); }
  100.  
  101. #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  print_operand_address(FILE, ADDR)
  102.